package asteroids.model.programs.statements;

import exception.StopActionClassException;
import asteroids.model.programs.Program;

public class ThrusterStatement extends ActionStatement {
	
	public ThrusterStatement(boolean enable){
		this.enable=enable;
	}

	@Override
	public void execute(Program program) throws StopActionClassException {
		if(!isExecuted()){
		program.getShip().changeThrustersActivationState(getEnable());
		setExecuted();
		throw new StopActionClassException(this);
		}
	}
	
	public boolean getEnable(){
		return this.enable;
	}
	
	private boolean enable;

	

}
